<div class="content-form">
    <h2><?php echo $this->titulo; ?></h2>
    <form id="form_galeria" action="" method="post">
        <input type="hidden" name="id" value="<?php echo $this->result->GAL_ID; ?>" />
        <table id="tlist" class="tb_content">
            <tr> 
                <td width="40" style="height: 50px;" >
                    <label>Título</label>
                </td>
                <td width="100">
                    <input type="text" name="titulo" value="<?php echo $this->result->GAL_NOM; ?>" />
                </td>  
            </tr>
            <tr> 
                <td colspan="2">
                    <label><input type="radio" name="tamanho" value="N" <?php if($this->result->GAL_TAM == 'N') echo 'checked=""'; ?> /> Foto Normal</label>
                    &nbsp;&nbsp;
                    <label><input type="radio" name="tamanho" value="D" <?php if($this->result->GAL_TAM == 'D') echo 'checked=""'; ?> /> Foto Destaque</label>
                </td>  
            </tr>
            <tr> 
                <td colspan="2" >
                    <a class="btn-frm" style="float: right;" href="javascript:void(0)" onclick="$('#dialog').dialog('close');" >Cancelar</a>
                    <input type="submit" name="submit" style="float: right;" value="Enviar" class="btn-frm">
                </td>
            </tr>
        </table>
    </form>
</div>
<script>
$(function(){
    
    $('#form_galeria').submit(function(){
        $.post(URLBASE+'/'+CONTROL+'/edit', $(this).serialize(), function(data){                  
           if(data.ok)
           {
               $('#cnt_gl_'+data.id).html(data.html);
               $("#dialog").dialog('close');
           }   
        }, 'json'); 
        return false; 
    });
});
</script>    
